from agent520.utils.ini_parser import config
from agent520.version import version_string
from agent520.utils import load_plugin


def info():
    """
    Return string with info about agent360:
    - version
    - plugins enabled
    - absolute path to plugin directory
    - server id from configuration file
    """
    plugins_path = load_plugin.get_plugins_path(config)

    plugins_enabled = load_plugin.get_plugins(state='enabled', config=config)

    return '\n'.join((
        'Version: %s' % version_string(),
        'Plugins enabled: %s' % ', '.join(plugins_enabled),
        'Plugins directory: %s' % plugins_path,
        'Server: %s' % config.get('agent', 'server'),
    ))
